<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
	xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout"
	layout:decorator="layout">
<head>
<title th:text="新增"></title>
</head>
<body>
	<div layout:fragment="content">
		<div class="row">
			<label th:text="新增"></label>
		</div>
		<form class="form-horizontal" 
				th:action="${id} ? @{/order(update)} : @{/order(add)}" 
				th:object="${model}" method="post">
				
			<input type="hidden" name="id" th:value="${id}">
			
			<div class="form-group" th:class="${#fields.hasErrors('id')} ? 'form-group has-error' :'form-group'" >
				<label class="col-sm-2 control-label">id</label>
				<div class="col-sm-5 ">
					<!-- 目前仅支持text,以后可以增加select,radio,checkbox,textarea -->
					<input type="text" name="id" th:field="*{id}" class="form-control">
				</div>
				<label class="col-sm-2 control-label"  th:errors="*{id}"></label>
			</div>
			<div class="form-group" th:class="${#fields.hasErrors('customeId')} ? 'form-group has-error' :'form-group'" >
				<label class="col-sm-2 control-label">顾客id</label>
				<div class="col-sm-5 ">
					<!-- 目前仅支持text,以后可以增加select,radio,checkbox,textarea -->
					<input type="text" name="customeId" th:field="*{customeId}" class="form-control">
				</div>
				<label class="col-sm-2 control-label"  th:errors="*{customeId}"></label>
			</div>
			<div class="form-group" th:class="${#fields.hasErrors('good')} ? 'form-group has-error' :'form-group'" >
				<label class="col-sm-2 control-label">商品</label>
				<div class="col-sm-5 ">
					<!-- 目前仅支持text,以后可以增加select,radio,checkbox,textarea -->
					<input type="text" name="good" th:field="*{good}" class="form-control">
				</div>
				<label class="col-sm-2 control-label"  th:errors="*{good}"></label>
			</div>
			<div class="form-group" th:class="${#fields.hasErrors('price')} ? 'form-group has-error' :'form-group'" >
				<label class="col-sm-2 control-label">价格</label>
				<div class="col-sm-5 ">
					<!-- 目前仅支持text,以后可以增加select,radio,checkbox,textarea -->
					<input type="text" name="price" th:field="*{price}" class="form-control">
				</div>
				<label class="col-sm-2 control-label"  th:errors="*{price}"></label>
			</div>
			
			<div class="form-group">
				<div class="col-sm-offset-2 col-sm-10">
					<button type="submit" class="btn btn-default">保 存</button>
				</div>
			</div>
			
		</form>
	</div>
</body>
</html>
